package org.jslaughter.event.eventtype;

import org.nvframe.entity.Entity;
import org.nvframe.event.AbstractEvent;
import org.nvframe.event.EventListener;

/**
 * 
 * @author Nik Van Looy
 */
public class PullEvent extends AbstractEvent {

	private static Class<? extends EventListener> listener = PullListener.class;
	
	private Entity aggressor;
	private Entity target;

	public PullEvent(Entity aggressor, Entity target) {
		// set event-specific properties
		this.aggressor = aggressor;
		this.target = target;
	}
	
	public void dispatchToListener(EventListener listener) {
		((PullListener) listener).onPulled(this);
	}

	public Entity getAggressor() {
		return aggressor;
	}

	public Entity getTarget() {
		return target;
	}

	@Override
	protected Class<? extends EventListener> getListener() {
		return listener;
	}

}
